import http from "../utils/http/service";

// 新增资源
export const postAddResource = (data): any => {
  return http.post("/snow-admin/sysResource/addResource", data);
};

// 资源列表
export const postResourceGroupList = (data): any => {
  return http.post("/snow-admin/sysResource/resourceGroupList", data);
};

// 删除一级资源
export const postDeleteResource = (data): any => {
  return http.post("/snow-admin/sysResource/deleteResource", data);
};

// 删除按钮
export const postDeleteResSingle = (data): any => {
  return http.post("/snow-admin/sysResource/deleteResSingle", data);
};

// 新增单个资源下的按钮
export const postAddResSingle = (data): any => {
  return http.post("/snow-admin/sysResource/addResSingle", data);
};

// 更新单个资源下的按钮
export const postUpdateResSingle = (data): any => {
  return http.post("/snow-admin/sysResource/updateResSingle", data);
};

export const postRoleResourceAuth = (data): any => {
  // return http.post("/epms-admin/sysRole/roleResourceAuth", data);
  return http.post("/snow-admin/sysRole/roleResourceAuth", data);
};

export const postGetRoleResourceAuth = (data): any => {
  // return http.post("/epms-admin/sysRole/getRoleResourceAuth", data);
  return http.post("/snow-admin/sysRole/getRoleResourceAuth", data);
};

export const postResourceAuth = (data): any => {
  // return http.post("/epms-admin/sysResource/resourceAuth", data);
  return http.post("/snow-admin/sysResource/resourceAuth", data);
};

export const postUpdateResource = (data): any => {
  return http.post("/snow-admin/sysResource/updateResource", data);
};
